package com.hzy.es.result;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Response<T> {
    private String code;
    private T t;

    public static <T> Response fail(String code, T t){
        return new Response(code, t);
    }

    public static <T> Response success(T t){
        return new Response("200", t);
    }
}
